package com.swt.gap.service.impl;

import com.hankcs.hanlp.HanLP;
import com.swt.gap.service.TextService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author tyh
 * @Date 2020/5/20 16:42
 */

@Service
public class TextServiceImpl implements TextService {

    @Override
    public List<String> getKeyword(String text) {
        List<String> keywordList = HanLP.extractKeyword(text, 3);
        return keywordList;
    }

    @Override
    public List<String> getSummary(String text) {
        List<String> sentenceList = HanLP.extractSummary(text, 3);
        return sentenceList;
    }
}
